<!--
 * @Author: daidai
 * @Date: 2022-03-01 09:16:22
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-09-29 15:12:34
 * @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue
-->
<template>
  <dv-border-box-13 :reverse="reverse" :dur="12" class="lr_titles" :color="color"
    :backgroundColor="$store.state.setting.isMain ? backgroundColor : backgroundColor2">
    <div class="item_title" v-if="title !== ''">
      <!-- <div class="zuo"></div> -->
      <div class="title-inner">
        {{ title }}
      </div>
      <div class="you"></div>
    </div>
    <div :class="title !== '' ? 'item_title_content' : 'item_title_content_def'">
      <slot></slot>
    </div>
  </dv-border-box-13>
</template>

<script>
export default {
  data() {
    return {
      color: ["#0a5c91", "#082b5a"],
      backgroundColor: "rgba(0, 22, 49, 1)",
      backgroundColor2: "rgba(0, 22, 49, 1)",
    };
  },
  props: {
    title: {
      type: String,
      default: () => "",
    },
    reverse: {
      type: Boolean,
      default: () => false,
    },
  },
  created() { },

  mounted() { },
  methods: {},
};
</script>
<style lang="scss" scoped>
$item-title-height: 38px;
$item_title_content-height: calc(100% - 38px);

.lr_titles {
  box-sizing: border-box;
  margin: 0 10px;
  pointer-events: auto;

  :deep(.border-box-content) {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }

  .item_title {
    height: $item-title-height + 4px;
    line-height: $item-title-height;
    width: 100%;
    color: #31abe3;
    text-align: center;
    // background: linear-gradient(to right, transparent, #0f0756, transparent);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    .zuo,
    .you {
      // width: 58px;
      // height: 14px;
      // background-image: url("../../assets/img/titles/zuo.png");
      width: 100%;
      height: 3px;
      // background: linear-gradient(
      //   92deg,
      //   #0072ff 0%,
      //   #00eaff 48.8525390625%,
      //   #01aaff 100%
      // );
      margin-left: -11px;
      background: linear-gradient(90deg,
          rgba(0, 161, 252, 0.57) 0%,
          rgba(0, 161, 252, 0) 100%);
      // border: 1px solid red;
    }

    // .you {
    //   transform: rotate(180deg);
    // }
    .title-inner {
      font-family: PangMenZhengDao;
      // font-weight: 900;
      letter-spacing: 2px;
      // background: linear-gradient(
      //   92deg,
      //   #0072ff 0%,
      //   #00eaff 48.8525390625%,
      //   #01aaff 100%
      // );
      // -webkit-background-clip: text;
      // -webkit-text-fill-color: transparent;
      color: #fff;
      margin-bottom: -4px;
    }
  }

  .item_title_content {
    height: $item_title_content-height;
  }

  .item_title_content_def {
    width: 100%;
    height: 100%;
  }
}
</style>
